﻿<%@ Page Language="C#" MasterPageFile="~/GUI/SiteMasterPage.Master" AutoEventWireup="True" CodeBehind="ShareDocument.aspx.cs" Inherits="wdss.GUI.ShareDocument" Title="Share Document" %>
<asp:Content ID="Content2" ContentPlaceHolderID="content1" runat="server">
<br /><br />
    <table align ="center">
	    <tr>
	    <td>
	    <asp:Label ID = welcome_lbl runat =server Font-Names = "Arial Rounded MT Bold" 
	    ForeColor ="white" Text="Welcome" Font-Size="20px"></asp:Label>
	    </td>
	    <td>
	    <asp:Label ID = username_lbl runat =server Font-Names = "Arial Rounded MT Bold" 
	    ForeColor ="white" Text="" Font-Size="20px"></asp:Label>
	    </td>
	    <td>
	    <asp:Label ID = sym_lbl runat =server Font-Names = "Arial Rounded MT Bold" 
	    ForeColor ="white" Text="...!" Font-Size="20px"></asp:Label>
	    </td>
	    </tr></table>
	    <br />
 <div class="heading">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     <table align=center>   
        <asp:Label ID="Label1" runat="server"  Text="Share Document" Font-Bold="True" 
                Font-Names="Arial Rounded MT Bold" Font-Size="XX-Large" 
             ForeColor="White" Width="287px"></asp:Label>
    </table>
    <br /><br />
    </div>
    <left>

        <table align =center border=2 >
            <tr>
                <td align="left">
                    <asp:Label ID="Label2" Text="Username " ForeColor="White" 
                runat=server Font-Names="Arial Rounded MT Bold"></asp:Label>
                </td>
                <td align="left" colspan="2">
                    <asp:TextBox ID="txt_Username" runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfv_Username" runat="server" ControlToValidate="txt_Username" Text="Please enter a valid username."></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align=left >
                    <asp:Label ID="Label3" Text="Document " ForeColor="White" 
                runat=server Font-Names="Arial Rounded MT Bold"></asp:Label>
                </td>
                <td align="left" colspan="2">
                    <asp:DropDownList ID="ddl_AuthoredDocuments" runat="server" 
                        CausesValidation="True" DataSourceID="sql_authored_documents" 
                        DataTextField="doc_title"  ForeColor ="black" DataValueField="doc_id"></asp:DropDownList>
                    <asp:SqlDataSource ID="sql_authored_documents" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:aspnetdbConnectionString %>" 
                        SelectCommand="sp_GetAuthoredDocuments" 
                        SelectCommandType="StoredProcedure" ProviderName="System.Data.SqlClient">
                        <SelectParameters>
                            <asp:SessionParameter DefaultValue="0" Name="par_userid" SessionField="userid" 
                                Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td align="center" >
                    <asp:CheckBox ID="cb_Read" runat="server" Visible="true" Text="Read Access" ForeColor="White" 
                Font-Names="Arial Rounded MT Bold" />
                </td>
                <td align="center">
                    <asp:CheckBox ID="cb_Update" runat="server" Visible="true" Text="Update Access" ForeColor="White" 
                Font-Names="Arial Rounded MT Bold" />
                </td>
                <td align="center">
                    <asp:CheckBox ID="cb_Check" runat="server" Visible="true" Text="Checkout Access" ForeColor="White" 
                Font-Names="Arial Rounded MT Bold" />
                </td>
            </tr>
            <tr>
                
                <td align="left" colspan="2">
                    <asp:Label ID="lbl_Error" runat="server" Visible="false" ForeColor="Red"></asp:Label>
                    <asp:Label id="lbl_Success" runat="server" Visible="false" Text="Successfully Shared a document." ForeColor="White" 
                Font-Names="Arial Rounded MT Bold"/>
                </td>
                <td align="right" >
                    <asp:Button ID="btn_Share" Text="Share" runat=server BackColor="#14263A" 
                BorderStyle="Outset" Font-Names="Arial Rounded MT Bold" ForeColor="White" 
                        onclick="btn_Share_Click" />
                </td>
            </tr>
        </table>
    </left>
</asp:Content>

